<template>
  <el-form :model="form" label-width="120px">
    <el-form-item label="学院名称">
      <el-input v-model="form.college_name" />
    </el-form-item>
    <el-form-item label="下属专业数">
      <el-input v-model="form.major_number" disabled/>
    </el-form-item>
    <el-form-item label="下属班级数">
      <el-input v-model="form.class_number" disabled/>
    </el-form-item>
    <el-form-item label="学院人数">
      <el-input v-model="form.college_p_number" disabled/>
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="submitForm() ">确认添加</el-button>
      <el-button @click="closeDialog() ">取消</el-button>
    </el-form-item>
  </el-form>
</template>

<script>
// 假设有一个API模块来处理与后端的交互

export default {
  data() {
    return {
      form: {
        college_name: '',
        major_number: 0,
        class_number: 0,
        college_p_number: 0
      },
    };
  },
  methods: {
    submitForm() {
      this.$emit('submit-form', this.form);
      // 触发提交事件
    },
    closeDialog() {
      this.$emit('close-dialog');
      // 触发关闭事件
    },
  },
};
</script>
